<template>
	<view>
		<!-- <img class="bg-img" src="@appstatic/img/my/bg-img.jpg" alt=""> -->
		<view class="orange-father">
			<view class="orange-tip">
				<view class="text">
					<uni-icons type="info-filled" size="16" color="#ADB0AE"></uni-icons>
					<view style="padding-left: 6px;">统计时间：{{time}}</view>
				</view>
			</view>
		</view>

		<view class="list">
			<view class="row" v-for="(item,index) in content">
				<view class="left">{{content[index].key}}</view>
				<view class="right">{{content[index].value}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	const network = require("@manager/network-manager.js");
	export default {
		data() {
			return {
				time: '',
				content: [],
				deviceId: '',
				condition: {}
			}
		},

		onShow: function(options) {
			if (uni.getStorageSync('deviceId')) {
				this.deviceId = uni.getStorageSync('deviceId')
			}
			this.showList();
		},
		methods: {
			showList() {
				var uri = app.globalData.config.interfaces.URL_CMOBILE_VEHICLEINFO_VEHICLECONDITION
				var params = {
					deviceId: this.deviceId
				}
				network.get(uri, params, 'form').then(res => {
					if (res.code == 200) {
						this.time = res.data.updatedTime
						var detail = JSON.parse(res.data.detail)
						console.log(detail)
						this.content = detail

					}
				})

			}
		}
	}
</script>

<style>
	page {
		background-image: url(https://pfmotortest.hb4oss.xstore.ctyun.cn/appstatic/img/my_logo_bg.png);
		width: 100%;
		height: 100%;
		background-repeat: space;
		background-size: 100%;
	}

	/* 	.bg-img {
		position: fixed;
		height: 100%;
		width: 100%;
		top: 0;
		left: 0;
		z-index: -1;
	} */
	.orange-father {
		position: sticky;
		top: 0;
		z-index: 100;
		background-color: #F5F5F5;
	}

	.orange-tip {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;

		height: 39px;
		background: #EDEDED;
		padding-left: 17px;
	}

	.text {
		min-width: 0;
		display: flex;
		flex-direction: row;
		align-items: center;
		flex: 1;

		font-family: 'Noto Sans SC';
		font-style: normal;
		font-weight: 400;
		font-size: 26upx;
		line-height: 19px;
		color: #ADB0AE;
	}

	.list {
		padding: 0px 16px 0px 16px;
		display: flex;
		flex-direction: column;
	}

	.row {
		display: flex;
		justify-content: space-between;
		flex-direction: row;
		align-items: center;
		height: 51px;
	}
</style>
